package com.imodia.checkoo.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.hsq.commons.util.db.GenericIbatisDao;
import com.hsq.commons.util.db.SqlParam;
import com.hsq.commons.util.db.annotation.SqlSpace;
import com.imodia.checkoo.bean.CmsPageAdSiteBean;
import com.imodia.checkoo.service.CmsPageAdSiteService;

@SqlSpace(spaceName="cmspageadsite")
@Service("cmsPageAdSiteService")
public class CmsPageAdSiteServiceImpl 
	extends 
	GenericIbatisDao<CmsPageAdSiteBean, Integer> implements
	CmsPageAdSiteService {
		
	public void save(List<CmsPageAdSiteBean> list,int adId){
		SqlParam sql = new SqlParam();
		sql.andEqualTo("ad_id", String.valueOf(adId));
		delete(sql);
		batchInsert(list);
	}
}